package com.indexingsystem.boss.admin.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.indexingsystem.boss.entity.ResourceRelations;

public interface ResourceRelationsMapper {
    int deleteByPrimaryKey(String resRelationId);

    int insert(ResourceRelations record);

    int insertSelective(ResourceRelations record);

    ResourceRelations selectByPrimaryKey(String resRelationId);

    int updateByPrimaryKeySelective(ResourceRelations record);

    int updateByPrimaryKey(ResourceRelations record);
    
    
    /**
     * 通过资源id获取资源关系所有记录.
     * @param resId
     * @return
     */
    List<ResourceRelations> getResourceRelationsListByResId(String resId);
    
    
    
    /**
     * 批量清理资源关系.
     * @param list
     * @return
     */
    int deleteBatchResourceRelationsByResIdList(@Param("list") List<String> list);
    
    
    /**
     * 批量清理second_res_id资源关系.
     * @param list
     * @return
     */
    int deleteBatchResourceRelationsRightByResIdList(@Param("list") List<String> list);
    
    
    /**
     * 通过主键id批量清理资源关系.
     * @param list
     * @return
     */
    int deleteBatchResRelationsByIdList(@Param("list") List<String> list);
}